﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Common;
using BusinessLayer;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;

namespace SeAssignment.Models
{
        public class UserLogin
        {
            [Required]
            [Display(Name = "User name")]
            public string UserName { get; set; }

            [Required]
            [DataType(DataType.Password)]
            [Display(Name = "Password")]
            public string Password { get; set; }

            [Display(Name = "Remember me?")]
            public bool RememberMe { get; set; }

            public bool IsValid(string username, string password)
            {
                return new UsersBL().UserLogin(username, password);
            }
        }
}